<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:a4j="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich">
    <h:form id="RoleFormEntity" prependId="false">
        <rich:messages globalOnly="true"/>
        <h:panelGrid columns="3" id="editRoleGroup" style="padding: 10px;">
            <h:panelGroup layout="block">
                <h:outputLabel style="color: red;" value="#{msg['asterisk']}"/>
                <h:outputLabel id="roleNameLabel" value="#{msg['role.name']}#{msg['colon']}"/>
            </h:panelGroup>
            <h:inputText id="roleName" value="#{roleBean.entity.roleName}"/>
            <rich:message for="roleName"/>

            <h:outputLabel id="roleSignLable" value="#{msg['role.sign']}#{msg['colon']}"/>
            <h:inputText id="roleSign" value="#{roleBean.entity.roleSign}"/>
            <rich:message for="roleSign"/>


            <h:outputLabel id="sortLabel"
                           value="#{msg['table.sort']}#{msg['colon']}"/>
            <h:inputText id="sortRole" value="#{roleBean.entity.sort}">
                <f:validateLongRange minimum="1" maximum="100"/>
            </h:inputText>
            <rich:message for="sortRole"/>
        </h:panelGrid>
        <rich:tabPanel id="UserInfoTab">
            <rich:tab header="权限">

            </rich:tab>
        </rich:tabPanel>
        <h:panelGroup layout="block" style="text-align: center;" id="ActionForm">
            <a4j:commandButton value="#{msg['action.save']}" action="#{roleBean.save}"
                               render="roleList@body scroller" execute="editRoleGroup"
                               oncomplete="if (#{facesContext.maximumSeverity==null}) {PawnPopup.hide('rolePopupAdd')}"/>

            <a4j:commandButton value="#{msg['action.cancel']}" immediate="true" render="@none" execute="@none"
                               onclick="PawnPopup.hide('rolePopupAdd');"/>

        </h:panelGroup>
    </h:form>
</ui:composition>